package hcn.protocol.brandnew.zhenliao.shouma;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
import java.util.List;


/**
 * 获取手术消息-响应消息(成功) - ODS_03080041_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class ListQueryResponse {

    @XmlElement(name = "Total")
    private Long total;

    /**
     * 手术集合
     */
    @XmlElementWrapper(name = "RequestLists")
    @XmlElement(name = "RequestList")
    private List<RequestList> requestLists;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RequestList {

        /**
         * 医疗机构组织机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 机构名称
         */
        @XmlElement(name = "VisitOrganizationName")
        private String visitOrganizationName;
        /**
         * 手术记录单编号
         */
        @XmlElement(name = "OperationSourceId")
        private String operationSourceId;
        /**
         * 患者ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 住院号码
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 患者性别
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 患者年龄
         */
        @XmlElement(name = "Age")
        private String age;
        /**
         * 手术编码
         */
        @XmlElement(name = "OperationCode")
        private String operationCode;
        /**
         * 手术名称
         */
        @XmlElement(name = "OperationName")
        private String operationName;
        /**
         * 就诊科室代码
         */
        @XmlElement(name = "DeptCode")
        private String deptCode;
        /**
         * 科室名称
         */
        @XmlElement(name = "DeptName")
        private String deptName;
        /**
         * 手术状态代码
         */
        @XmlElement(name = "OperationStatus")
        private String operationStatus;
        /**
         * 当前状态（文字
         */
        @XmlElement(name = "OperationStatusStr")
        private String operationStatusStr;
        /**
         * 手术间编号
         */
        @XmlElement(name = "OperationRoomNo")
        private String operationRoomNo;

        /**
         * 手术时间
         */
        @XmlElement(name = "ArrangeTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date arrangeTime;
        /**
         * 安排手术时间
         */
        @XmlElement(name = "ArrangeOperationTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date arrangeOperationTime;
        /**
         * 手术地点
         */
        @XmlElement(name = "OperationPlace")
        private String operationPlace;
        /**
         * 手术台次
         */
        @XmlElement(name = "OperationCounts")
        private Byte operationCounts;
        /**
         * 麻醉方法代码
         */
        @XmlElement(name = "AnesthesiaWayCode")
        private String anesthesiaWayCode;
        /**
         * 手术者
         */
        @XmlElement(name = "Operator")
        private String operator;
        /**
         * 麻醉医师
         */
        @XmlElement(name = "AnesthesiaDoctor")
        private String anesthesiaDoctor;
        /**
         * 手术护士
         */
        @XmlElement(name = "InstrumentNurse")
        private String instrumentNurse;
        /**
         * 备注
         */
        @XmlElement(name = "RemarkInfo")
        private String remarkInfo;
        /**
         * 病区
         */
        @XmlElement(name = "WardArea")
        private String wardArea;
        /**
         * 病床号
         */
        @XmlElement(name = "SickbedId")
        private String sickbedId;

        @XmlElementWrapper(name = "OperatorLists")
        @XmlElement(name = "OperatorList")
        private List<OperatorList> operatorLists;//手术医师集合

        @XmlElementWrapper(name = "AnesthesiaDoctorLists")
        @XmlElement(name = "AnesthesiaDoctorList")
        private List<AnesthesiaDoctorList> anesthesiaDoctorLists;//麻醉医师

        @XmlElementWrapper(name = "AssistantorLists")
        @XmlElement(name = "AssistantorList")
        private List<AssistantorList> assistantorLists;//助手集合

        @XmlElementWrapper(name = "InstrumentNurseLists")
        @XmlElement(name = "InstrumentNurseList")
        private List<InstrumentNurseList> instrumentNurseLists;//手术护士集合
    }

    @XmlRootElement(name = "InstrumentNurseList")
    public static class InstrumentNurseList {
        private String instrumentNurseName;        //手术护士名称
        private String instrumentNurseDeptName;    //手术护士科室名称


        @XmlElement(name = "InstrumentNurseName")
        public String getInstrumentNurseName() {
            return instrumentNurseName;
        }

        public void setInstrumentNurseName(String instrumentNurseName) {
            this.instrumentNurseName = instrumentNurseName;
        }


        @XmlElement(name = "InstrumentNurseDeptName")
        public String getInstrumentNurseDeptName() {
            return instrumentNurseDeptName;
        }

        public void setInstrumentNurseDeptName(String instrumentNurseDeptName) {
            this.instrumentNurseDeptName = instrumentNurseDeptName;
        }
    }

    @XmlRootElement(name = "AssistantorList")
    public static class AssistantorList {
        private String operatorName;
        private String assistantorDeptName;

        @XmlElement(name = "OperatorName")
        public String getOperatorName() {
            return operatorName;
        }

        public void setOperatorName(String operatorName) {
            this.operatorName = operatorName;
        }



        @XmlElement(name = "AssistantorDeptName")
        public String getAssistantorDeptName() {
            return assistantorDeptName;
        }

        public void setAssistantorDeptName(String assistantorDeptName) {
            this.assistantorDeptName = assistantorDeptName;
        }
    }

    @XmlRootElement(name = "AnesthesiaDoctorList")
    public static class AnesthesiaDoctorList {
        private String anesthesiaDoctorType;
        private String anesthesiaDoctorName;
        private String anesthesiaDoctorDeptName;

        @XmlElement(name = "AnesthesiaDoctorType")
        public String getAnesthesiaDoctorType() {
            return anesthesiaDoctorType;
        }

        public void setAnesthesiaDoctorType(String anesthesiaDoctorType) {
            this.anesthesiaDoctorType = anesthesiaDoctorType;
        }

        @XmlElement(name = "AnesthesiaDoctorName")
        public String getAnesthesiaDoctorName() {
            return anesthesiaDoctorName;
        }

        public void setAnesthesiaDoctorName(String anesthesiaDoctorName) {
            this.anesthesiaDoctorName = anesthesiaDoctorName;
        }

        @XmlElement(name = "AnesthesiaDoctorDeptName")
        public String getAnesthesiaDoctorDeptName() {
            return anesthesiaDoctorDeptName;
        }

        public void setAnesthesiaDoctorDeptName(String anesthesiaDoctorDeptName) {
            this.anesthesiaDoctorDeptName = anesthesiaDoctorDeptName;
        }



    }

    @XmlRootElement(name = "OperatorList")
    public static class OperatorList {
        private String operatorType;    //1、主 2、副
        private String operatorName;    //手术医师名称
        private String operatorDeptName;//手术医师科室名称

        @XmlElement(name = "OperatorType")
        public String getOperatorType() {
            return operatorType;
        }

        public void setOperatorType(String operatorType) {
            this.operatorType = operatorType;
        }

        @XmlElement(name = "OperatorName")
        public String getOperatorName() {
            return operatorName;
        }

        public void setOperatorName(String operatorName) {
            this.operatorName = operatorName;
        }

        @XmlElement(name = "OperatorDeptName")
        public String getOperatorDeptName() {
            return operatorDeptName;
        }

        public void setOperatorDeptName(String operatorDeptName) {
            this.operatorDeptName = operatorDeptName;
        }

    }

}
